Skip to content

Add vision describe built-in OCR tasks - #364

Open
hopelynd wants to merge 1 commit into
mainfrom
feat/ocr-intent
Open

hopelynd wants to merge 1 commit into
mainfrom
feat/ocr-intent

Conversation

@hopelynd

@hopelynd hopelynd commented Dec 2, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add --ocr-task on bl vision describe to call the native DashScope multimodal-generation OCR API for structured extraction (tables, KIE, formulas, and related built-in tasks)
  • Keep plain describe unchanged: OCR defaults, request path, and response shape apply only when --ocr-task is set; Token Plan connections are refused up front
  • Document OCR usage in bailian-gen and move tongyi-intent-detect-v3 guidance to the bailian-cli hub skill

Description

OCR mode

--ocr-task switches to the native endpoint with parameters.ocr_options.task. Supported models are allowlisted (qwen-vl-ocr, qwen-vl-ocr-2025-11-20, qwen3.5-ocr); the OCR default model is qwen-vl-ocr and does not affect non-task describe calls. --min-pixels / --max-pixels attach to the image content item on both the native OCR body and the compatible chat path.

Pre-qwen3.5 OCR models drop a non-empty --prompt with a warning because the service uses a fixed per-task prompt; qwen3.5-ocr can combine task and instruction. Large local images fall back to temporary OSS upload within the documented data-URI budget; oversized inline data URIs are rejected locally without echoing the payload. Length truncation surfaces as OCR_OUTPUT_TRUNCATED.

Docs and tests

Skill and reference docs call out the two JSON envelopes (output.choices vs top-level choices). Offline e2e and output-contract coverage lock routing, dry-run previews, Token Plan rejection, prompt handling, and process-boundary stderr diagnostics.

…ilities

- Introduced built-in OCR tasks for image processing, allowing users to extract structured information from images using the native DashScope multimodal-generation API.
- Updated the `vision describe` command to include new flags: `--ocr-task`, `--min-pixels`, and `--max-pixels`.
- Enhanced error handling for image input validation and size limits.
- Updated documentation to reflect new features and usage examples for OCR tasks.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant